package com.okaixz.client.controller;

import com.okaixz.client.model.dto.TabsDto;
import com.okaixz.common.annotation.Anonymous;
import com.okaixz.common.core.controller.BaseController;
import com.okaixz.common.core.page.TableDataInfo;
import com.okaixz.manager.domain.Tab;
import com.okaixz.manager.service.ITabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *  二级菜单管理Controller
 *
 * @author ruoyi
 * @date 2024-08-17
 */
@RestController
@RequestMapping("/tab")
@Anonymous
public class ClientTabController extends BaseController
{
    @Autowired
    private ITabService tabService;

    /**
     * 菜单查询接口
     */
    @GetMapping("/list")
    public TableDataInfo list(Tab tab)
    {
        startPage();
        List<Tab> list = tabService.selectTabList(tab);
        return getDataTable(list);
    }
    /**
     * 菜单查询接口
     */
    @GetMapping("/listAll")
    public TableDataInfo listAll(Tab tab)
    {
        List<TabsDto> list = tabService.selectTabListAll(tab);
        return getDataTable(list);
    }




}
